package org.miyuki4j.cfgtool.fx;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

public class MainDemoApp extends Application {
    public static void main(String[] args) throws Exception {
        launch(MainDemoApp.class, args);
    }

    @Override
    public void start(Stage primaryStage) {
        Label label = new Label("Hello, JavaFX in Java 8!");
        Circle circle = new Circle(100, 100, 30);
        Group root = new Group(circle, label);
        Scene scene = new Scene(root, 400, 200);
        primaryStage.setTitle("My JavaFX App");
        primaryStage.setScene(scene);
        primaryStage.setResizable(true);
        primaryStage.setMaxHeight(800);
        primaryStage.setMaxWidth(800);
        primaryStage.setFullScreen(true);
        primaryStage.setOnCloseRequest(event -> {
            System.out.println("Bye!, evt:" + event);
        });
        primaryStage.show();
    }
}


